package com.ruoyi.bill.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bill.mapper.BillMapper;
import com.ruoyi.bill.domain.Bill;
import com.ruoyi.bill.service.IBillService;

/**
 * 账单统计Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-03
 */
@Service
public class BillServiceImpl implements IBillService 
{
    @Autowired
    private BillMapper billMapper;

    /**
     * 查询账单统计
     * 
     * @param id 账单统计主键
     * @return 账单统计
     */
    @Override
    public Bill selectBillById(Long id)
    {
        return billMapper.selectBillById(id);
    }

    /**
     * 查询账单统计列表
     * 
     * @param bill 账单统计
     * @return 账单统计
     */
    @Override
    public List<Bill> selectBillList(Bill bill)
    {
        return billMapper.selectBillList(bill);
    }

    /**
     * 新增账单统计
     * 
     * @param bill 账单统计
     * @return 结果
     */
    @Override
    public int insertBill(Bill bill)
    {
        bill.setCreateTime(DateUtils.getNowDate());
        return billMapper.insertBill(bill);
    }

    /**
     * 修改账单统计
     * 
     * @param bill 账单统计
     * @return 结果
     */
    @Override
    public int updateBill(Bill bill)
    {
        bill.setUpdateTime(DateUtils.getNowDate());
        return billMapper.updateBill(bill);
    }

    /**
     * 批量删除账单统计
     * 
     * @param ids 需要删除的账单统计主键
     * @return 结果
     */
    @Override
    public int deleteBillByIds(Long[] ids)
    {
        return billMapper.deleteBillByIds(ids);
    }

    /**
     * 删除账单统计信息
     * 
     * @param id 账单统计主键
     * @return 结果
     */
    @Override
    public int deleteBillById(Long id)
    {
        return billMapper.deleteBillById(id);
    }
}
